
<%@ page import="com.edusite.Alumnos" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="mainAdmin" />
        <g:set var="entityName" value="${message(code: 'alumnos.label', default: 'Alumnos')}" />
        <title><g:message code="default.edit.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/home/indice')}">Home</a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.edit.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${alumnosInstance}">
            <div class="errors">
                <g:renderErrors bean="${alumnosInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <g:hiddenField name="id" value="${alumnosInstance?.id}" />
                <g:hiddenField name="version" value="${alumnosInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                                                    <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="apellidos"><g:message code="alumnos.apellidos.label" default="Apellidos" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alumnosInstance, field: 'apellidos', 'errors')}">
                                    <g:textField name="apellidos" value="${alumnosInstance?.apellidos}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="nombre"><g:message code="alumnos.nombre.label" default="Nombre" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alumnosInstance, field: 'nombre', 'errors')}">
                                    <g:textField name="nombre" value="${alumnosInstance?.nombre}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="usuario"><g:message code="alumnos.usuario.label" default="Usuario" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alumnosInstance, field: 'usuario', 'errors')}">
                                    <g:textField name="usuario" maxlength="12" value="${alumnosInstance?.usuario}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="password"><g:message code="alumnos.password.label" default="Password" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alumnosInstance, field: 'password', 'errors')}">
                                    <g:passwordField name="password" maxlength="12" value="${alumnosInstance?.password}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="dni"><g:message code="alumnos.dni.label" default="Dni" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alumnosInstance, field: 'dni', 'errors')}">
                                    <g:textField name="dni" value="${alumnosInstance?.dni}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="correoe"><g:message code="alumnos.correoe.label" default="Correoe" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alumnosInstance, field: 'correoe', 'errors')}">
                                    <g:textField name="correoe" value="${alumnosInstance?.correoe}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="direccion"><g:message code="alumnos.direccion.label" default="Direccion" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alumnosInstance, field: 'direccion', 'errors')}">
                                    <g:textField name="direccion" value="${alumnosInstance?.direccion}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="poblacion"><g:message code="alumnos.poblacion.label" default="Poblacion" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alumnosInstance, field: 'poblacion', 'errors')}">
                                    <g:textField name="poblacion" value="${alumnosInstance?.poblacion}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="provincia"><g:message code="alumnos.provincia.label" default="Provincia" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alumnosInstance, field: 'provincia', 'errors')}">
                                    <g:textField name="provincia" value="${alumnosInstance?.provincia}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="telefono"><g:message code="alumnos.telefono.label" default="Telefono" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alumnosInstance, field: 'telefono', 'errors')}">
                                    <g:textField name="telefono" value="${alumnosInstance?.telefono}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="asignatura"><g:message code="alumnos.asignatura.label" default="Asignatura" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: alumnosInstance, field: 'asignatura', 'errors')}">
                                    <g:select name="asignatura.id" from="${com.edusite.Asignaturas.list()}" optionKey="id" value="${alumnosInstance?.asignatura?.id}"  />
                                </td>
                            </tr>
                        
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
